const common = {
	namespaced: true,
	state: {
		regionId:null,
		city: {
			id: null,
			name: '全部'
		},
		enumTypes: {
			
		}
	},
	mutations: {
		setRegionId(state,regionId) {
			state.regionId = regionId;
		},
		setEnumTypes(state, enumTypes) {
			state.enumTypes = enumTypes;
		},
		setCity(state,city){
			state.city = city;
		}
	},
	actions: {
		init(context, payload){
			return this.$http.get('/api/services/app/Common/GetAllEnumTypes')
			.then(res=>{
				context.commit('setEnumTypes',res.data.result);
			});
		}
	}
}

export default common;